- time_tracker = User.current.hourglass_time_tracker

- if time_tracker and (not @once)
  = render partial: 'hooks/time_tracker/start_dialog_content', locals: {time_tracker: time_tracker}
  - @once = (not nil)

- booking_params = {:params=>{:time_tracker=>{:issue_id=>time_booking.issue&.id,
    :activity_id => time_booking.activity&.id,
    :comments => time_booking.comments}}}
= link_to '', start_hourglass_time_trackers_path, class: 'icon-hourglass-continue js-hourglass-remote js-start-tracker', title: t(:button_continue), remote: true, method: 'post', data: booking_params

- if policy(time_booking).change?
  = link_to '', hourglass_ui_edit_time_bookings_path(time_booking), class: 'icon-edit js-show-inline-form', title: t(:button_edit), remote: true, data: {type: 'html'}
- if policy(time_booking).destroy?
  = link_to '', hourglass_time_booking_path(time_booking), class: 'icon-del js-hourglass-remote', title: t(:button_delete), remote: true, method: :delete, data: {confirm: t(:text_are_you_sure)}
